package com.gupao.jly521.lazy;

/**
 * @author Jly
 * @date 2018/8/21  15:43
 */
public class LazyTwo {

    private LazyTwo() {
    }

    private static LazyTwo instance = null;

    /**
     *  加了 synchronized 性能损耗很大
     * @date 2018/8/21 15:44
     * @author Jly
     * @param []
     * @return com.gupao.jly521.lazy.LazyTwo
     */
    public synchronized static LazyTwo getInstance(){
        if (instance == null){
            instance = new LazyTwo();
        }
        return instance;
    }
}
